package com.rocky.server.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.Logger;

public class Util {
	private static Logger logger = Logger.getLogger(Util.class);

	public static Date getDateByString(String dateString) {
		try {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Date date;
			date = sdf.parse(dateString);
			return date;
		} catch (ParseException e) {
			logger.error(e.toString());
		}
		return null;
	}
}
